package com.leen.video.entity;


import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 定时任务
 * </p>
 *
 * @author yy
 * @since 2021-05-19
 */
@Setter
@Getter
@Entity
@Table(name = "quartz_job")
@Data
@ToString(callSuper = true)
@ApiModel(value="QuartzJob对象", description="定时任务")
public class QuartzJob implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    @ApiModelProperty(value = "Spring Bean名称")
    @Column(name = "bean_name")
    private String beanName;

    @ApiModelProperty(value = "cron 表达式")
    @Column(name = "cron_expression")
    private String cronExpression;

    @ApiModelProperty(value = "状态：1暂停、0启用")
    @Column(name = "is_pause")
    private int isPause;

    @ApiModelProperty(value = "任务名称")
    @Column(name = "job_name")
    private String jobName;

    @ApiModelProperty(value = "方法名称")
    @Column(name = "method_name")
    private String methodName;

    @ApiModelProperty(value = "参数")
    @Column(name = "params")
    private String params;

    @ApiModelProperty(value = "备注")
    @Column(name = "remark")
    private String remark;


    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm")
    @JSONField(format = "yyyy/MM/dd HH:mm")
    @ApiModelProperty(value = "创建日期")
    @Column(name = "create_time")
    private Date createTime;


    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    @JSONField(format = "yyyy/MM/dd HH:mm:ss")
    @Column(name = "update_time")
    @ApiModelProperty(value = "修改日期")
    private Date updateTime;

    @Column(name = "is_del")
    private int  isDel;


}
